﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class LoadLevel : MonoBehaviour 
{
	public int LevelIndex;

	protected void OnCollisionEnter2D(Collision2D collider)
	{
		if(collider.gameObject.tag == "Player")
		{
			UnityEngine.SceneManagement.SceneManager.LoadScene(LevelIndex);
		}
	}
}
